<template>
	<view>
		<Header></Header>
		<NavImg :isbool="false" :imgSrc="imgSrc"></NavImg>
		<Main :dataVal="obj"></Main>
		<view class="bg"></view>
		<Item></Item>
		<view class="bg"></view>
		<UlContent :ulData="ulData"></UlContent>
		<Content :showData="showData"></Content>
		<Footer></Footer>
		<Last  :NavData3="NavData3"></Last>
	</view>
</template>

<script>
	import Header from '../jelly/son/header.vue'
	import NavImg from '../jelly/son/img.vue'
	import Main from '../jelly/son/main.vue'
	import Item from './son/main.vue'
	import UlContent from '../jelly/son/ulContent.vue'
	import Content from './son/Content.vue'
	import Footer from './son/footer.vue'
	import Last from '../jelly/son/footer.vue'
	import request from '../../http/request2.js'
	export default{
		data(){
			return {
				imgSrc:'',
				obj:{
					name:'',
					collections:'',
					pageview:''
				},
				ulData: [],
				showData:[],
				NavData3: [],
			}
		},
		components:{
			Header,NavImg,Main,Item,UlContent,Content,Footer,Last
		},
		methods:{
			async getData(){
				let	id= '601fa488882000007800671b';
				const res = await request({
					url:'/search/menuDetail',
					method:"post",
					data:{
						_id:id
					}
				})
				const result = await request({
					url:'/vip/likeMenu',
				})
					this.imgSrc = res.message[0].coverpic
					this.obj.name = res.message[0].name;
					this.obj.collections = res.message[0].collections;
					this.obj.pageview = res.message[0].pageview;
					this.ulData = res.message[0].ingredient
					this.showData = res.message[0].method
					this.NavData3 = result.menus;
					
			}
		
		},
		created() {
		
		this.getData();
		}
	}
</script>

<style>
	.bg{
		background-color: rgb(246,247,248);
		height: 28rpx;
		
	}
</style>
